import {Toast} from 'vant'
function copyWord(words) {
    if (!words) return
    if (words.indexOf(':') > -1) {
        words = words.split(':')[1].trim()
    }
    textToClipboard(words)
}
// 复制到剪贴板
function textToClipboard(text) {
    Toast('复制成功!');
    var dummy = document.createElement("textarea");
    document.body.appendChild(dummy);
    dummy.value = text;
    dummy.select();
    document.execCommand("copy");
    document.body.removeChild(dummy);
}
export{
    copyWord,
    textToClipboard
}